

/*---------------------------------------------------------
   Initializes the effect. The data is a table of data 
   which was passed from the server.
---------------------------------------------------------*/
function EFFECT:Init( data )
	
	self.Pos = data:GetOrigin()
	self.Ang = data:GetAngle()
	self.For = self.Ang:Forward()
	self.Emitter = ParticleEmitter( self.Entity.Pos )
	
	for i=1,12 do
	
		local particle = self.Emitter:Add("particles/smokey", self.Pos )

		particle:SetVelocity(Vector(math.Rand(-7,7),math.Rand(-7,7),math.Rand(-7,7)) + (self.For * math.Rand(100,290)))
		particle:SetDieTime( math.Rand(.5,1) )
		particle:SetStartAlpha( math.random( 50, 75 ) )
		particle:SetEndAlpha( 0 )
		particle:SetStartSize( math.Rand( 3, 10 ) )
		particle:SetEndSize( math.Rand( 40, 70 ) )
		particle:SetRoll( math.Rand( -180, 180 ) )
		particle:SetRollDelta( math.Rand( -0.1, 0.1 ) )
		
		local col =  render.GetLightColor( self.Pos ) 
		col = col * 255
		col.r = math.Clamp(col.r,0,80)
		col.g = math.Clamp(col.g,0,80)
		col.b = math.Clamp(col.b,0,80)
		particle:SetColor( col.r,col.g,col.b )
		
		self.Emitter:Finish()
		
	end
end


/*---------------------------------------------------------
   THINK
   Returning false makes the entity die
---------------------------------------------------------*/
function EFFECT:Think( )
	return false
end


/*---------------------------------------------------------
   Draw the effect
---------------------------------------------------------*/
function EFFECT:Render()
	// Do nothing - this effect is only used to spawn the particles in Init
end
